package com.vhall.component.controller.lottery;


import com.vhall.component.controller.lottery.facade.LotteryConsoleFacade;
import com.vhall.component.entity.lottery.vo.*;
import com.vhall.component.framework.common.annotation.VhallComponent;
import com.vhall.component.plugin.common.annotation.TokenAuth;
import com.vhall.component.service.lottery.LotteryConsoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author ceshi
 * @date 2021/6/2511:30
 */

@VhallComponent
public class LotteryConsoleController implements LotteryConsoleFacade {

    @Autowired
    private LotteryConsoleService lotteryConsoleService;

    /**
     * 抽奖列表
     *
     * @param lotteryListInfoReqVo
     * @return
     */
    @TokenAuth
    @Override
    public LotteryGetsRspVO gets(LotteryListInfoReqVo lotteryListInfoReqVo) {
        return lotteryConsoleService.gets(lotteryListInfoReqVo);
    }

    /**
     * 控制台-获取抽奖中奖人名单
     *
     * @param lotteryUsersGetReqVO
     * @return
     */
    @TokenAuth
    @Override
    public LotteryUsersGetRspVO usersGet(LotteryUsersGetReqVO lotteryUsersGetReqVO) {
        return lotteryConsoleService.usersGet(lotteryUsersGetReqVO);
    }

    /**
     * 控制台-导出中奖人名单
     *
     * @param lotteryExportReqVO
     * @return
     */
    @TokenAuth
    @Override
    public Boolean exportLottery(LotteryExportReqVO lotteryExportReqVO) {
        return lotteryConsoleService.exportLottery(lotteryExportReqVO);
    }

    @Override
    public Boolean deleteLotteryUser(Integer accountId) {
        lotteryConsoleService.delWinner(accountId);
        return true;
    }

    @Override
    public LotteryWinnerPageVO getLotteryWinner(Integer lotteryId, String roomId, int pageNum, int pageSize) {
        return lotteryConsoleService.getLotteryWinner(lotteryId,roomId,  pageNum, pageSize);
    }


}
